import time

from base.base import Base
import pytest
from pytest_assume.plugin import assume
from utils.db_utils import db_utils
from utils.generate_logs_util import get_log
logger = get_log(__name__)

class UpdateRichtext(Base):
    def update_richtext(self, title,autor,phone):
        self.switch_node('update_richtext')
        self.click('advertisement_title')
        self.click('richtext_list')
        dy1 = self.text_content('richtext_list_dy')
        # 富文本编辑页面断言
        assume('文章编辑' == dy1,f'断言失败，实际结果为：{dy1}')
        self.fill('title_input',title)
        self.fill('aothor_input',autor)
        self.fill('phone_input',phone)
        # 滚动1000像素
        self.scrollto_x(1000)
        # 点击提交按钮
        self.click('commit_button')



